package gui.Reportes.Compras;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import gui.Reportes.Produccion.Reportes;

import java.util.Date;

/**d
 *F:\trunk\softduccion\src\ReporteFactura.java
 * @author LiziTa
 */
public class ReporteProdReal extends javax.swing.JInternalFrame {

    /**
     * Creates new form ReporteFactura
     */
    

       
    String id="";
    java.util.Date fechaInicio = new java.util.Date(); 
    java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat("yyyy-MM-dd");
//    String fi = sdf.format(fechaInicio);
   public String ffi;
   public String fff;
  
   public Date fechaFin= new Date();
   String ff=sdf.format(fechaFin);
   
   public ReporteProdReal() {
     initComponents();
        jdpInicio.setDate(new Date());
        jdpFin.setDate(new Date());
    }
   
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jdpInicio = new org.jdesktop.swingx.JXDatePicker();
        jLabel3 = new javax.swing.JLabel();
        btnVer = new javax.swing.JButton();
        jdpFin = new org.jdesktop.swingx.JXDatePicker();

        setClosable(true);
        setTitle("Reporte Produccion Real");

        jLabel2.setText("Fecha Inicio:");

        jLabel3.setText("Fecha Fin:");

        btnVer.setText("Generar Reporte");
        btnVer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(113, 113, 113)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel3)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jdpInicio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jdpFin, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(88, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnVer)
                .addGap(132, 132, 132))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jdpInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jdpFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(btnVer)
                .addContainerGap(27, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnVerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVerActionPerformed
        // TODO add your handling code here:
        Date fechaIn = jdpInicio.getDate();
        Date fechaFi = jdpFin.getDate();
        String in = sdf.format(fechaIn);
        String fin = sdf.format(fechaFi);
        //        id = txtCodigo.getText();
        //        if (txtCodigo.getText().isEmpty()){
            //            JOptionPane.showMessageDialog(null,"Seleccione una Orden");
            //
            //        }
        //        else{
            Reportes r = new Reportes();
             r.mostrarProduccionReal(in, fin);
            // }
    }//GEN-LAST:event_btnVerActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnVer;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    public org.jdesktop.swingx.JXDatePicker jdpFin;
    public org.jdesktop.swingx.JXDatePicker jdpInicio;
    // End of variables declaration//GEN-END:variables
}
